import { defineConfig } from '@umijs/max';
import routes from './router';
import Theme from './theme.json'
import { CONFIG } from '../src/constants';

export default defineConfig({
    base: '/',
    publicPath: '/',
    antd: {
        appConfig: {

        },
        // configProvider
        configProvider: {
        },
        theme: {
            ...Theme,
            cssVar: true,
        },
        import: false,
        // dark:true
    },
    lessLoader: {},
    locale: {
        // 默认使用 src/locales/zh-CN.ts 作为多语言文件
        default: 'ru-RU',
        baseSeparator: '-',
    },
    dva: {},
    access: {},
    model: {},
    initialState: {},
    request: {},
    layout: {
        title: 'GLUZ',
        locale: true, // layout中启用locale配置
    },
    icons: {
    },
    routes,
    npmClient: 'yarn',
    proxy: {
        '/dev-api': {
            target: CONFIG.HTTP_REQUEST_URL,
            changeOrigin: true,
            pathRewrite: { '^/dev-api': '' },
        },
    },
});
